#ifndef GFSLIBRARY_H_
#define GFSLIBRARY_H_
/***************************************************************
* gfsLibrary.h : GFS user-library Header
*
* @author : Ridho B - 0606101906
* @version : 0.0
*
***************************************************************/
#include "gfsGlobal.h"

			// INITIALIZATION //
/**********************************************************************************
* gfs_init_globus : validity and open file in url location
* @params : string url of file 
* @return : integer of flag
***********************************************************************************/
extern int gfs_init_GFS();
/**********************************************************************************
* gfs_init_service : validity and open file in url location
* @params : string url of file 
* @return : integer of flag
***********************************************************************************/
extern int gfs_init_RNS();

			// ACCESS FILE //
/**********************************************************************************
* gfs_open_file : validity and open file in url location
* @params : string url of file 0
* @return : integer of flag
***********************************************************************************/
extern int gfs_open_file(char *strGFSPath, char *mode, GFS_file *file_ref);
/**********************************************************************************
* gfs_close_file : Close and update metadata of file in url location
* @params : string url of file 
* @return : integer of flag
***********************************************************************************/
extern int gfs_close_file(GFS_file *file);
/**********************************************************************************
* gfs_write_file : Write file from source location to destination location
* @params : Source and Destination location 
* @return : integer of flag
***********************************************************************************/
extern int gfs_end_file(GFS_file file);
/**********************************************************************************
* gfs_write_file : Write file from source location to destination location
* @params : Source and Destination location 
* @return : integer of flag
***********************************************************************************/
extern int gfs_write_file(GFS_file file, void *buffer, int iSize);
/**********************************************************************************
* gfs_read_file : Read file from source location to destination location
* @params : Source and Destination location 
* @return : integer of flag
***********************************************************************************/
extern int gfs_read_file(GFS_file file, void *buffer, int iSize);
/**********************************************************************************
* gfs_delete_file : Delete and update info of file in url location
* @params : string url of file 
* @return : integer of flag
***********************************************************************************/
extern int gfs_remove_file(char *strGFSPath);


			// ACCESS DIRECTORY //
/**********************************************************************************
* gfs_read_dir : read list of dir in directory in string url location
* @params : string url of directory and List of string name of directory
* @return : integer of flag
***********************************************************************************/
extern int gfs_read_dir(char *strGFSPath, GFS_item *listGFSItem_ref);
/**********************************************************************************
* gfs_make_dir : make and update info of directory in url location
* @params : string url of directory and string Name of directory
* @return : integer of flag
***********************************************************************************/
extern int gfs_create_dir(char *strGFSPath);
/**********************************************************************************
* gfs_remove_dir : remove url of directory
* @params : string url of directory 
* @return : integer of flag
***********************************************************************************/
extern int gfs_remove_dir(char *strGFSPath);
/**********************************************************************************
* gfs_check_dir : check url of directory
* @params : string url of directory 
* @return : integer of flag
***********************************************************************************/
extern int gfs_check_dir(char *strGFSPath);


			// ACCESS BOTH DIRECTORY & FOLDER //
/**********************************************************************************
* gfs_delete_recursive : Delete and update info of file in url location
* @params : string url of file 
* @return : integer of flag
***********************************************************************************/
extern int gfs_remove_recursive(char *strGFSPath);
/**********************************************************************************
* gfs_move_recursive : Move file and update info of file in url location
* @params : string url of file 
* @return : integer of flag
***********************************************************************************/
extern int gfs_move(char *strSrcGFSPath, char *strDstGFSPath);


			// CONFIGURATION //
/**********************************************************************************
* gfs_change_mode : validity and open file in url location
* @params : string url of file 
* @return : integer of flag
***********************************************************************************/
extern int gfs_change_mode(char *strSrcGFSPath, char *mode);
/**********************************************************************************
* gfs_get_server : validity and open file in url location
* @params : string url of file 
* @return : integer of flag
***********************************************************************************/
extern int gfs_get_server(GFS_server *listGFSServer_ref);
/**********************************************************************************
* gfs_get_error : validity and open file in url location
* @params : string url of file 
* @return : integer of flag
***********************************************************************************/
extern int gfs_SU_on(char *strPassword);
/**********************************************************************************
* gfs_get_error : validity and open file in url location
* @params : string url of file 
* @return : integer of flag
***********************************************************************************/
extern int gfs_SU_off();
/**********************************************************************************
* gfs_get_error : validity and open file in url location
* @params : string url of file 
* @return : integer of flag
***********************************************************************************/
extern int gfs_SU_change_pwd(char *strOldPassword, char *strNewPassword);
/**********************************************************************************
* gfs_get_server : validity and open file in url location
* @params : string url of file 
* @return : integer of flag
***********************************************************************************/
extern char *gfs_get_error(int iStatus);

#endif /*GFSLIBRARY_H_*/
